<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>影厅管理</title>
    <link href="/movie/Movie_version_1.00/movie/Public/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/movie/Movie_version_1.00/movie/Public/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="/movie/Movie_version_1.00/movie/Public/static/admin/css/layout.css" rel="stylesheet">
    <!--artDialog-->
    <link href="/movie/Movie_version_1.00/movie/Public/static/art-dialog/css/ui-dialog.css" rel="stylesheet"/>
    <script src="/movie/Movie_version_1.00/movie/Public/static/art-dialog/dist/dialog-min.js"></script>
    <!--RainJS-->
    <link href="/movie/Movie_version_1.00/movie/Public/static/pfinal/css/base.css" rel="stylesheet"/>
    <script src="/movie/Movie_version_1.00/movie/Public/static/pfinal/pfinal.js"></script>

</head>
<body>
<!-- .row必须包含在 .container(固定宽度)或 .container-fluid(100% 宽度)中，以便为其赋予合适的排列(aligment)和内补(padding)-->
<nav class="layout-header">
    <div class="container layout-width">
        <div class="row">
            <div class="col-md-12">
                <div class="pull-left">
                    <a href="" class="logo">
                        <span class="fa fa-desktop"></span> 商户管理后台
                    </a>
                </div>
                <div class="pull-right">
                <span class="account-info">
                    <span>欢迎:<?php echo ($username); ?></span>
                     <i class="glyphicon glyphicon-print"></i>
                    <a class="login-out" href="<?php echo U('Default/logout');?>">退出</a>
                </span>
                </div>
            </div>
        </div>
    </div>
</nav>

<section class="container layout-main layout-width">
    <div class="row">
        <div class="col-md-12 display-table">

            <!--左菜单区域-->
            <div class="layout-menu" >
                <ul class="main-menu">
                <li>
                    <button style="width:100%" type="button" class="btn btn-default btn-lg">放映厅管理</button>
                </li>
                    <li>
                        <a class="menu-item" href="<?php echo U('Room/index');?>">
                            <i class="glyphicon glyphicon-time"></i>
                            <i class="icon pull-right"></i>
                            <span>放映厅列表</span>
                        </a>
                    </li>
                    <li class="">
                        <a class="menu-item" href="" data-toggle="modal" data-target="#myModal4">
                            <i class="icon glyphicon glyphicon-th-large"></i>
                            <i class="icon pull-right"></i>
                            <span>添加放映厅</span>
                        </a>
                    </li>
                    <li class="">
                        <a class="menu-item" href="" data-toggle="modal" data-target="#myModal55">
                            <i class="icon glyphicon glyphicon-th-large"></i>
                            <i class="icon pull-right"></i>
                            <span>添加座位</span>
                        </a>
                    </li>
                    <li>
                    <button style="width:100%" type="button" class="btn btn-default btn-lg">放映场次管理</button>
                    </li>
                    
                    <li class="">
                        <a class="menu-item" href="<?php echo U('Index/index');?>">
                            <i class="glyphicon glyphicon-play-circle"></i>
                            <i class="icon pull-right"></i>
                            <span>放映场次列表</span>
                        </a>
                    </li>
                    <li class="">
                        <a class="menu-item" data-toggle="modal" data-target="#myModal5" href="">

                            <i class="icon glyphicon glyphicon-th-large"></i>
                            <i class="icon pull-right"></i>
                            <span>添加放映场次</span>
                        </a>
                    </li>
                </ul>
            </div>
            <!-- 左菜单区域结束-->

            <!--右内容区域-->
            
    <!--右内容区域-->
    <div class="layout-content">
        <div class="page-title">放映厅管理</div>

        <div class="content-top">
            <ul class="top-nav">
                <li class="active"><span>放映厅列表</span></li>
            </ul>
            <div class="clearfix"></div>

        </div>
        <!--content-main end-->
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">

                    <div class="hide ui-tips bg-info" id="error">
                        <span class=" icon glyphicon glyphicon-info-sign">13123 </span>
                    </div>

                    <form class="form-horizontal" method="post" onsubmit="return false">

                        <div class="form-group">
                            <label class="col-sm-2 control-label">ID</label>

                            <div class="col-sm-8">
                                <input type="text" name="id" class="form-control" value="<?php echo ($data['id']); ?>" id="saveid" readonly="readonly">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">影厅名</label>

                            <div class="col-sm-8">
                                <input type="text" name="name" class="form-control" value="<?php echo ($data['name']); ?>" id="save">
                                <span class="help-block"></span>
                            </div>
                        </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-8">
                        <button class="btn btn-default" id="revise">保存</button>
                    </div>
                </div>
                </form>
            </div>
        </div>

    </div>
    </div>
    <!--右内容区域结束-->

            <!--右内容区域结束-->
            <div class="clearfix"></div>
        </div>
    </div>
</section>
<footer class="layout-footer">
    <div class="container layout-width">
        <div class="row">
            <div class="col-md-12">
                <ul class="links">
                    <li><a href="" target="_blank">关于我们</a></li>
                    <li><a href="" target="_blank">服务协议</a></li>
                    <li><a href="" target="_blank">运营规范</a></li>
                    <li><a href="" target="_blank">客服中心</a></li>
                    <li><a href="" target="_blank">在线客服</a></li>
                    <li><p class="copyright">Copyright.All Rights Reserved.</p></li>
                </ul>
            </div>
        </div>
    </div>
</footer>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="/movie/Movie_version_1.00/movie/Public/static/ie8/html5shiv.min.js"></script>
<script src="/movie/Movie_version_1.00/movie/Public/static/ie8/respond.min.js"></script>
<![endif]-->

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/movie/Movie_version_1.00/movie/Public/static/jquery/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/movie/Movie_version_1.00/movie/Public/static/bootstrap/js/bootstrap.min.js"></script>

    <script>
        $('#revise').click(function () {

            if ($('#save').val() == '') {
                $('#error').attr('class', 'ui-tips bg-info').find('span').html('请输入影厅');
            }


            $.ajax({
                url: "<?php echo U('Room/docreate');?>",
                type: 'POST',
                data: {'id': $('#saveid').val(), 'name': $('#save').val()},
                dataType: 'json',
                success: function (data) {
                     if(data){
                         window.location.href="<?php echo U('Room/index');?>";
                     }else{
                         $('#error').attr('class', 'ui-tips bg-info').find('span').html('修改影厅失败');
                     }
                }
             })
        })
    </script>

</body>
</html>